From: Andre Przywara Date: Mon, 18 Apr 2011 08:49:13 +0000 (+0100) Subject: svm: add bit definitions for SVM DecodeAssist X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1962e1f81464e8a9749c19d538ecf746bf68e330;p=xen.git svm: add bit definitions for SVM DecodeAssist Chapter 15.33 of recent APM Vol.2 manuals describe some additions to SVM called DecodeAssist. Add the newly added fields to the VMCB structure and name the associated CPUID bit. Signed-off-by: Andre Przywara --- diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 59c021b8f9..fe0a62559f 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -1000,6 +1000,7 @@ struct hvm_function_table * __init start_svm(void) P(cpu_has_svm_lbrv, "Last Branch Record (LBR) Virtualisation"); P(cpu_has_svm_nrips, "Next-RIP Saved on #VMEXIT"); P(cpu_has_svm_cleanbits, "VMCB Clean Bits"); + P(cpu_has_svm_decode, "DecodeAssists"); P(cpu_has_pause_filter, "Pause-Intercept Filter"); #undef P diff --git a/xen/include/asm-x86/hvm/svm/svm.h b/xen/include/asm-x86/hvm/svm/svm.h index 9f0afd8478..59dbf39e4e 100644 --- a/xen/include/asm-x86/hvm/svm/svm.h +++ b/xen/include/asm-x86/hvm/svm/svm.h @@ -90,6 +90,7 @@ extern u32 svm_feature_flags; #define cpu_has_svm_svml cpu_has_svm_feature(SVM_FEATURE_SVML) #define cpu_has_svm_nrips cpu_has_svm_feature(SVM_FEATURE_NRIPS) #define cpu_has_svm_cleanbits cpu_has_svm_feature(SVM_FEATURE_VMCBCLEAN) +#define cpu_has_svm_decode cpu_has_svm_feature(SVM_FEATURE_DECODEASSISTS) #define cpu_has_pause_filter cpu_has_svm_feature(SVM_FEATURE_PAUSEFILTER) #define SVM_PAUSEFILTER_INIT 3000 diff --git a/xen/include/asm-x86/hvm/svm/vmcb.h b/xen/include/asm-x86/hvm/svm/vmcb.h index d832216409..f589bdf5ac 100644 --- a/xen/include/asm-x86/hvm/svm/vmcb.h +++ b/xen/include/asm-x86/hvm/svm/vmcb.h @@ -435,7 +435,9 @@ struct vmcb_struct { vmcbcleanbits_t cleanbits; /* offset 0xC0 */ u32 res09; /* offset 0xC4 */ u64 nextrip; /* offset 0xC8 */ - u64 res10a[102]; /* offset 0xD0 pad to save area */ + u8 guest_ins_len; /* offset 0xD0 */ + u8 guest_ins[15]; /* offset 0xD1 */ + u64 res10a[100]; /* offset 0xE0 pad to save area */ svm_segment_register_t es; /* offset 1024 - cleanbit 8 */ svm_segment_register_t cs; /* cleanbit 8 */